package com.cndw.kungfu.domain;

import com.cndw.kungfu.model.Context;
import com.cndw.kungfu.vo.SkillVO;

/**
 * 玩家的技能信息
 * @author fantadust
 * @date 2011-5-5 下午09:28:22
 */
public class Skill {
	/**
	 * 玩家id
	 */
	private long playerId;
	/**
	 * 技能根id
	 */
	private int skillLibId;
	/**
	 * 等级
	 */
	private int level;	
	
	/**
	 * 当前等级索引id
	 */
	private int skillId;
	
	/**
	 * 获得时间
	 */
	private int addTime;
	/**
	 * 技能位置
	 */
	private int position;
	/**
	 * 完成时间
	 */
	private long coolingOverTime = 0;
	
	
	public long getPlayerId() {
		return playerId;
	}
	public void setPlayerId(long playerId) {
		this.playerId = playerId;
	}	
	public int getSkillId() {
		return skillId;
	}
	public void setSkillId(int skillId) {
		this.skillId = skillId;
	}
	public int getAddTime() {
		return addTime;
	}
	public void setAddTime(int addTime) {
		this.addTime = addTime;
	}
	public int getPosition() {
		return position;
	}
	public void setPosition(int position) {
		this.position = position;
	}
	public long getCoolingOverTime() {
		return coolingOverTime;
	}
	public void setCoolingOverTime(long coolingOverTime) {
		this.coolingOverTime = coolingOverTime;
	}
	public int getSkillLibId() {
		return skillLibId;
	}
	public void setSkillLibId(int skillLibId) {
		this.skillLibId = skillLibId;
	}
	public int getLevel() {
		return level;
	}
	public void setLevel(int level) {
		this.level = level;
	}
	public SkillMode getSkillMode() {
		SkillMode skillMode = Context.getSkillServer().getSkillMode(skillId);
		return skillMode;
	}

	
	
	public SkillVO toSkillVO(){
		
		return new SkillVO(this);
	}
	
}
